<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>灯泡</title>
</head>
<body>
    <h1 id="text" onclick="changeText()">哈哈</h1>
    <script>
        function changeText() {
            element = document.getElementById('text')
            element.textContent = '我我我'
        }
</script>
</body>
</html>